package com.qianfeng.controller;

import com.qianfeng.dto.Result;
import com.qianfeng.entity.Education;
import com.qianfeng.service.EducationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@CrossOrigin
@ResponseBody
@RequestMapping(value = "/education")
@Controller
public class EducationController {

    @Autowired
    private EducationService educationService;

    @RequestMapping(value = "/getEducationList")
    public Result getEducationList(){
        List<Education> educationList = educationService.getEducationList();
        Result result = new Result();
        result.setData(educationList);
        return result;
    }


}
